package Demo05;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;


//原始方法封装
public class UserAction extends ActionSupport {
    @Override
    public String execute() throws Exception {
        HttpServletRequest request=ServletActionContext.getRequest();
        String s= request.getParameter("username");
        String s1= request.getParameter("password");

        User user=new User();

        user.setUsername(s);
        user.setPassword(s1);

        System.out.println(user.getUsername()+" : "+user.getPassword());
        return NONE;
    }
}
